package day02;

public class CharDemo2 {
    public static void main(String[] args) {
        //5)char:字符型，2个字节


        char c1 = '女';
        //字符女
        System.out.println(c1);
        char c2 = 'f';
        //字符f
        System.out.println(c2);
        char c3 = '6';
        //字符6
        System.out.println(c3);
        char c4 = ' ';
        //空格符
        System.out.println(c4);

        //char c5 = 女;// 编译错误，字符型直接量必须放在单引号中
        //char c6 = ''; //编译错误，必须有字符
        //char c7 = '10'; //编译错误，只能存储1个字符

        char c8 = 65; //0到65535之间
        System.out.println(c8); //println()会依据变量的类型做输出展示
        //c8为char型，所以会以字符的形式输出------A

        //例如是lnt类型的话会输出65
        int c11 =65;
        System.out.println(c11);


        char c9 = '\\';
        System.out.println(c9); //\
    }
}
